package com.xw.unification.entity.request;

import com.xw.unification.interfaces.RepeatableRequestRewriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.method.HandlerMethod;

import javax.servlet.http.HttpServletResponse;

/**
 * @author qiwei
 * @since v1.0.0
 */
public class RepeatableRequestEmptyRewriter implements RepeatableRequestRewriter {

    private static final Logger LOGGER = LoggerFactory.getLogger(RepeatableRequestEmptyRewriter.class);

    private static final RepeatableRequestEmptyRewriter INSTANCE = new RepeatableRequestEmptyRewriter();

    @Override
    public boolean rewrite(CopyOnReadHttpServletRequest request, HttpServletResponse response, HandlerMethod handlerMethod, RepeatableRequestRewriteContext ctx) {
        LOGGER.debug("Repeatable request no rewrite");
        return true;
    }
}
